Skip to content

Conversation

@jjonescz
Copy link
Member

@jjonescz jjonescz commented Oct 10, 2025

Resolves #80608.

Will need this test change in the SDK: dotnet/sdk#51192

@jjonescz jjonescz marked this pull request as ready for review October 13, 2025 18:44
@jjonescz jjonescz requested a review from a team as a code owner October 13, 2025 18:44
@jjonescz jjonescz requested a review from a team October 14, 2025 07:49
@jjonescz
Copy link
Member Author

@RikkiGibson @333fred @jaredpar @dotnet/roslyn-compiler for reviews, thanks

@jjonescz jjonescz requested a review from RikkiGibson October 23, 2025 09:08
Even on netfx hosts we want to use netcore compiler to be consistent with SDK's behavior since .NET 10.
The opt out is also the same as in SDK - setting RoslynCompilerType=Framework.
-->
<_UseRoslynBridgeTask Condition="'$(MSBuildRuntimeType)' != 'Core' and '$(RoslynCompilerType)' != 'Framework'">true</_UseRoslynBridgeTask>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the user meant to be able to put <RoslynCompilerType>Framework</RoslynCompilerType> in their project, in addition to PackageReference to MS.Net.Compilers.Toolset, and expect the toolset compiler to run on framework?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Although one needs to ensure it's put before the package props are imported (so putting inside Directory.Build.props would work; or manually before <Import Sdk> element; or just as /p: command-line arg, etc).

Copy link
Member

@RikkiGibson RikkiGibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but, my brain starts melting when I try to actually understand msbuild code.

@jjonescz jjonescz merged commit ce73a22 into dotnet:main Oct 24, 2025
36 checks passed
@jjonescz jjonescz deleted the toolset-core branch October 24, 2025 07:58
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 24, 2025
333fred added a commit to 333fred/roslyn that referenced this pull request Oct 24, 2025
* upstream/main: (332 commits)
  Cache lambdas in analyzer driver (dotnet#80759)
  Add information for NuGet package version 4.14 (dotnet#80870)
  Add missing search keywords to VB Advanced options page
  Fix IDE0031 false positive when preprocessor directives are used in if statements (dotnet#80878)
  Use core compiler on netfx hosts with toolset package (dotnet#80631)
  Make string concat assert more precise (dotnet#80619)
  Extensions: address some diagnostic quality issues (dotnet#80827)
  Add note on traversal order for bound nodes (dotnet#80872)
  Ensure that locals at the top level of a constructor have the same safe-context as parameters (dotnet#80807)
  Fix handling of SymbolDisplayCompilerInternalOptions.UseArityForGenericTypes option for non-native symbol implementations (dotnet#80826)
  Update src/Analyzers/CSharp/Tests/UseCollectionInitializer/UseCollectionInitializerTests.cs
  Add IsValidContainingStatement check to prevent collection initializers in using declarations
  Add back old DocumentSpan constructor (dotnet#80864)
  Add tests verifying pointer types in type parameters require unsafe context (dotnet#80776)
  Add regression test for Interlocked.Exchange with nullable types (dotnet#80796)
  Add regression test for ParseAttributeArgumentList with invalid input (fixes dotnet#8699) (dotnet#80705)
  Add regression test for compiler crash with syntax error in indexer declaration (dotnet#80772)
  Add runtime NullReferenceException validation to foreach null iteration tests (dotnet#80839)
  Update MicrosoftBuildTasksCoreVersionForMetrics to 17.11.48 (dotnet#80812)
  Mark CS4009 error as a "build only" error. (dotnet#80698)
  ...
jjonescz added a commit to jjonescz/dotnet-sdk that referenced this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toolset compiler package on .NET Framework should use .NET Core compiler

4 participants